package cz.acies.utils;

import java.util.Random;

public class UIDGenerator
{	
	private static Random rnd = new Random();

	public static String createUID(String prefix) {
		int i = 0;
		int rndi = 0;
		StringBuffer str = new StringBuffer("ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789");
		StringBuffer result = new StringBuffer("");
		result.append(prefix+".");
		for (i = 0; i < 15; i++) {
			rndi = rnd.nextInt(str.length());
			result.append(str.substring(rndi, rndi + 1));
		}
		return result.toString();
	}
}
